home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / numtow_1 / readme.txt < prev   
Text File  |  1998-09-08  |  4KB  |  115 lines

  1. ************************************************************************
  2. ********        ElfStrider Computer Solutions        ********
  3. ********              Grant Porteous            ********
  4. ********            strider@cloudnet.com        ********
  5. ************************************************************************
  6.  
  7. ------------------------------------------------------------------------
  8. Converting a Number to Words - ConvertNum.dll Version 2.0
  9. ------------------------------------------------------------------------
  10.  
  11. Included in ConvertNum.zip
  12.  
  13. ReadMe.txt (This Document)
  14. ConvertDemo.frm (Shows how to use the .dll)
  15. ConvertNum.dll
  16.  
  17.  
  18. It was written tested with VB5.0 SP3 (Not tested with anything else.)
  19.  
  20. ------------------------------------------------------------------------
  21. Changes Since Version 1.0 of ConvertNum.dll
  22. ------------------------------------------------------------------------
  23.  
  24. 1. Fixed bug which incorrectly changed values above 99999
  25. 2. Added support for Upper Case, Lower Case and Title Case output
  26. 3. Now able to specify Currency, AND currency Unit
  27.  
  28.  
  29. ------------------------------------------------------------------------
  30. Demo
  31. ------------------------------------------------------------------------
  32. This .dll accepts a number and converts it to words.
  33.  
  34. Use the demo provided to see how it works:
  35.  
  36. Do the following (once you have unzipped the ConvertDemo.frm and the ConvertNum.dll)
  37.  
  38. 1. Open the ConvertDemo.frm in VB
  39.  
  40. 2. Set a refernce to the dll by clicking on Project|References and then on the "Browse" button to locate the dll.
  41.  
  42. 3.Run the project (F5)
  43.  
  44. In the cmdConvert Click event you will see how to refernce the dll.
  45.  
  46. The following code references the dll
  47.  
  48.     Dim obj As New ConvertNum.NumtoText
  49.     
  50. The correct calling method is
  51.  
  52.     obj.fchange(m_Value, sCase, m_UseCurrency, m_CurrencyType, m_CurrencyUnit)
  53.  
  54. where:
  55.  
  56. m_value     (required)
  57.         Data Type : STRING
  58.         is the number you want converted.  
  59.  
  60. sCase        (Optional)
  61.         Data Type : STRING
  62.         If omitted then "Title Case" is used.  If you want Upper case then send the string "upper", or if you want lower case then send the string "lower"
  63.  
  64. m_UseCurrency    (Optional)
  65.         Data Type : Boolean (True/False); 
  66.         It indicates if you want the words to reflect the currency used
  67.  
  68. m_CurrencyType     (Optional)
  69.         Data Type: STRING
  70.         Indicates the type of currency eg dollar, yen etc.
  71.         Default is "dollar"
  72.  
  73. m_CurrencyUnit    (optional)
  74.         Data Type: STRING
  75.         Indicates the currency unit like "cent"
  76.         Default is "cent"
  77.         
  78.     
  79. NOTE:    
  80.  
  81. 1.    The maximum number the dll will convert is 922,337,203,685,476 (That is due to the limitation of VB's Currency data     type)
  82. 2.    When NOT using the "Show Currency" option, upto FOUR decimal places will be converted to words.  PLEASE NOTE, if you     use five or more decimal places the .dll WILL round up, if the 5th decimal place is above 5.
  83.     For example, the number 
  84.  
  85.     100.15437
  86.     
  87.     is displayed as 
  88.     
  89.     One Hundred and One Thousand Five Hundred and Forty Four Ten Thousandths
  90.  
  91. 3.    When using the "Show Currency" option, only TWO decimal places are converted, BUT there is NO rounding up if the     third digit is above 5.
  92.  
  93.     For example, the number 
  94.  
  95.     100.15837
  96.     
  97.     is displayed as 
  98.     
  99.     One Hundred Dollars and Fifteen Cents
  100.  
  101.     
  102.  
  103. Hope it's useful!
  104.  
  105. You can use this dll free of charge, in any way or form you wish. however, please don't claim credit for it.
  106.  
  107. --End
  108. ************************************************************************
  109. ********        ElfStrider Computer Solutions        ********
  110. ********              Grant Porteous            ********
  111. ********            strider@cloudnet.com        ********
  112. ************************************************************************
  113.  
  114.  
  115.